/*
 * Decompiled with CFR 0.150.
 */
package com.gys.spliteService.data;

import com.gys.common.util.UtilConst;
import java.io.Serializable;

public class JsonResult
implements Serializable {
    private static final long serialVersionUID = 1L;
    private static final String ERROR_MESSAGE = "\u670d\u52a1\u5668\u51fa\u73b0\u4e86\u4e00\u4e9b\u5c0f\u72b6\u51b5\uff0c\u6b63\u5728\u4fee\u590d\u4e2d\uff01";
    private Integer code;
    private Object data;
    private String message;

    public JsonResult(Integer code, Object data, String message) {
        this.data = data;
        this.message = message;
        this.code = code;
    }

    public static JsonResult success(Object data, String desc) {
        return new JsonResult(UtilConst.CODE_0, data, desc);
    }

    public static JsonResult fail(Integer code, String desc) {
        return new JsonResult(code, null, desc);
    }

    public static JsonResult process(Integer code, Object data, String desc) {
        return new JsonResult(code, data, desc);
    }

    public static JsonResult error() {
        return new JsonResult(UtilConst.CODE_500, null, ERROR_MESSAGE);
    }

    public JsonResult() {
    }

    public Integer getCode() {
        return this.code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public Object getData() {
        return this.data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public String getMessage() {
        return this.message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}

